//reflect 是一个静态类，Reflect内部封装了一系列对对象的底层操作，Reflect成员方法就是Proxy处理对象的默认实现

//Reflect 对象 统一提供一套用于操作对象的API

const obj = {
    foo:'123',
    bar:'456'
}

const proxy = new Proxy(obj,{
    get(target,property){
        console.log('watch logic-')//watch logic~

        return Reflect.get(target,property)
    }
})

console.log(proxy.foo)//123

const obj = {
    name:'zce',
    age:18
}

console.log('name' in obj)
console.log(delete obj['age'])
console.log(Object.keys(obj))

//reflect提供了一个统一的方式:

console.log(Reflect.has(obj,'name'))
console.log(Reflect.deleteProperty(obj,'age'))
console.log(Reflect.ownKeys(obj))